<!--[if lt IE 9]>
<script src="/static/common/js/jquery_1.11.1.min.js"></script>
<script src="/static/common/js/modernizr.js"></script>
<script src="/static/common/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="/static/common/js/jquery_2.1.1.min.js"></script>
<!--<![endif]-->
<!--<link rel="stylesheet" href="/static/common/highlight/default.min.css" />-->
<link rel="stylesheet" href="/static/common/editor.md/css/editormd.css" />
<!--<script src="/static/common/highlight/highlight.min.js"></script>-->
<script src="/static/common/editor.md/lib/marked.min.js"></script>
<script src="/static/common/editor.md/lib/prettify.min.js"></script>
<script src="/static/common/editor.md/lib/flowchart.min.js"></script>
<script src="/static/common/editor.md/lib/raphael.min.js"></script>
<script src="/static/common/editor.md/lib/underscore.min.js"></script>
<script src="/static/common/editor.md/lib/sequence-diagram.min.js"></script>
<script src="/static/common/editor.md/lib/jquery.flowchart.min.js"></script>
<script src="/static/common/editor.md/editormd.min.js"></script>
<script>
    $(function() {
        // hljs.initHighlightingOnLoad();

        var EditormdView = editormd.markdownToHTML("page_md_content", {
            htmlDecode: "style,script,iframe", // you can filter tags decode
            emoji: true,
            taskList: true,
            tex: true, // 默认不解析
            flowChart: true, // 默认不解析
            sequenceDiagram: true, // 默认不解析
        });

        //为所有table标签添加bootstap支持的表格类
        $("table").addClass("table table-bordered table-hover");
        //当表格列数过长时将自动出现滚动条
        $.each($('table'), function() {
            $(this).prop('outerHTML', '<div style="width: 100%;overflow-x: auto;">' + $(this).prop('outerHTML') + '</div>');
        });
    });
</script>